Fix for bug #557689 and bug #402349, where opening a file chooser in
authorCody Russell <bratsche@gnome.org>
Mon, 5 Apr 2010 17:57:33 +0000 (12:57 -0500)
committerCody Russell <bratsche@gnome.org>
Mon, 5 Apr 2010 17:57:33 +0000 (12:57 -0500)
folder browse mode would require the user to click on something
before clicking "Open".

gtk/gtkfilechooserdefault.c

index 81150d07ec7d9bdf516bb59e4446c6699857249a..1d6042998652aea623c351d412c9e0d1711dc402 100644 (file)
@@ -8594,8 +8594,16 @@ gtk_file_chooser_default_should_respond (GtkFileChooserEmbed *chooser_embed)
       entry = GTK_FILE_CHOOSER_ENTRY (impl->location_entry);
       check_save_entry (impl, &file, &is_well_formed, &is_empty, &is_file_part_empty, &is_folder);
 
-      if (is_empty || !is_well_formed)
-       return FALSE;
+      if (!is_well_formed)
+        return FALSE;
+
+      if (is_empty)
+        {
+          if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE)
+            return FALSE;
+
+          goto file_list;
+        }
 
       g_assert (file != NULL);